package com.itheima.day05_多态和内部类.develophomework03.homework02;

public class Test {
    /*
    创建测试类完成一下函数式接口匿名内部类使用和Lambda最简格式编写。
     */
    public static void main(String[] args) {
        InterA a = new InterA() {
            @Override
            public void show() {
                System.out.println("A的展示");
            }
        };
        a.show();
        InterB b = num -> System.out.println("B的展示"+num);
        b.method(10);

        InterC c = () -> "C的展示";
        String s = c.function();
        System.out.println(s);

        InterD d = (str,num)->{
            System.out.println("str:"+str+",num:"+num);
            return 100;
        };
        int java = d.niubility("Java", 100);
        System.out.println(java);
    }
}
//InterA
interface InterA{
    void show();
}

//InterB
interface InterB{
    void method(int num);
}

//InterC
interface InterC{
    String function();
}

//InterD
interface InterD{
    int niubility(String str, int num);
}